\hypertarget{_socket_8h}{\section{libemb/inc/\+Socket.h 文件参考}
\label{_socket_8h}\index{libemb/inc/\+Socket.\+h@{libemb/inc/\+Socket.\+h}}
}
{\ttfamily \#include \char`\"{}Base\+Type.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}I\+O\+Device.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Mutex.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Thread.\+h\char`\"{}}\\*
{\ttfamily \#include $<$pthread.\+h$>$}\\*
{\ttfamily \#include $<$sys/types.\+h$>$}\\*
{\ttfamily \#include $<$sys/socket.\+h$>$}\\*
{\ttfamily \#include $<$netinet/in.\+h$>$}\\*
{\ttfamily \#include $<$iostream$>$}\\*
\subsection*{类}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_socket}{Socket}
\begin{DoxyCompactList}\small\item\em Socket抽象基类 \end{DoxyCompactList}\item 
class \hyperlink{class_udp_socket}{Udp\+Socket}
\begin{DoxyCompactList}\small\item\em Udp\+Socket类 \end{DoxyCompactList}\item 
class \hyperlink{class_tcp_socket}{Tcp\+Socket}
\begin{DoxyCompactList}\small\item\em Tcp\+Socket类 \end{DoxyCompactList}\item 
class \hyperlink{class_udp_server}{Udp\+Server}
\begin{DoxyCompactList}\small\item\em Udp\+Server类 \end{DoxyCompactList}\item 
class \hyperlink{class_tcp_server}{Tcp\+Server}
\begin{DoxyCompactList}\small\item\em Tcp\+Server类 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{枚举}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{_socket_8h_afa49b80ffa7bf3f957f855318e150364}{S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E} \{ \\*
{\bfseries S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E}, 
{\bfseries S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+R\+C\+V\+B\+U\+F}, 
{\bfseries S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+S\+N\+D\+B\+U\+F}, 
{\bfseries S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+A\+D\+D\+R}, 
\\*
{\bfseries S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+P\+O\+R\+T}, 
{\bfseries S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+U\+N\+K\+N\+O\+W\+N} =0x\+F\+F
 \}
\item 
enum \hyperlink{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76}{S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E} \{ \hyperlink{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7}{S\+O\+C\+K\+E\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T}, 
\hyperlink{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79}{S\+O\+C\+K\+E\+T\+\_\+\+G\+R\+O\+U\+P\+C\+A\+S\+T}, 
\hyperlink{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85}{S\+O\+C\+K\+E\+T\+\_\+\+M\+U\+L\+T\+I\+C\+A\+S\+T}
 \}
\item 
enum \hyperlink{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7c}{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E} \{ \hyperlink{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77}{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P}, 
\hyperlink{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c}{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P}
 \}
\item 
enum \hyperlink{_socket_8h_a75ed4a192272be57647226a203cd8975}{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E} \{ \hyperlink{_socket_8h_a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278}{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T}, 
\hyperlink{_socket_8h_a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52}{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+C\+O\+N\+N\+E\+C\+T\+E\+D}
 \}
\end{DoxyCompactItemize}


\subsection{枚举类型说明}
\hypertarget{_socket_8h_afa49b80ffa7bf3f957f855318e150364}{\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E@{S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E}}
\index{S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E@{S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E}!Socket.\+h@{Socket.\+h}}
\subsubsection[{S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf S\+O\+C\+K\+E\+T\+\_\+\+A\+T\+T\+R\+\_\+\+E}}}\label{_socket_8h_afa49b80ffa7bf3f957f855318e150364}
定义socket的属性 \hypertarget{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76}{\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E@{S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E}}
\index{S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E@{S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E}!Socket.\+h@{Socket.\+h}}
\subsubsection[{S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf S\+O\+C\+K\+E\+T\+\_\+\+C\+A\+S\+T\+T\+Y\+P\+E\+\_\+\+E}}}\label{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76}
定义socket的可选项 \begin{Desc}
\item[枚举值]\par
\begin{description}
\index{S\+O\+C\+K\+E\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T@{S\+O\+C\+K\+E\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T@{S\+O\+C\+K\+E\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T}}\item[{\em 
\hypertarget{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7}{S\+O\+C\+K\+E\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T}\label{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7}
}]广播 \index{S\+O\+C\+K\+E\+T\+\_\+\+G\+R\+O\+U\+P\+C\+A\+S\+T@{S\+O\+C\+K\+E\+T\+\_\+\+G\+R\+O\+U\+P\+C\+A\+S\+T}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+G\+R\+O\+U\+P\+C\+A\+S\+T@{S\+O\+C\+K\+E\+T\+\_\+\+G\+R\+O\+U\+P\+C\+A\+S\+T}}\item[{\em 
\hypertarget{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79}{S\+O\+C\+K\+E\+T\+\_\+\+G\+R\+O\+U\+P\+C\+A\+S\+T}\label{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79}
}]组播 \index{S\+O\+C\+K\+E\+T\+\_\+\+M\+U\+L\+T\+I\+C\+A\+S\+T@{S\+O\+C\+K\+E\+T\+\_\+\+M\+U\+L\+T\+I\+C\+A\+S\+T}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+M\+U\+L\+T\+I\+C\+A\+S\+T@{S\+O\+C\+K\+E\+T\+\_\+\+M\+U\+L\+T\+I\+C\+A\+S\+T}}\item[{\em 
\hypertarget{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85}{S\+O\+C\+K\+E\+T\+\_\+\+M\+U\+L\+T\+I\+C\+A\+S\+T}\label{_socket_8h_a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85}
}]多播 \end{description}
\end{Desc}
\hypertarget{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7c}{\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E@{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E}}
\index{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E@{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E}!Socket.\+h@{Socket.\+h}}
\subsubsection[{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+E}}}\label{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7c}
定义socket的类型 \begin{Desc}
\item[枚举值]\par
\begin{description}
\index{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P@{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P@{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P}}\item[{\em 
\hypertarget{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77}{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P}\label{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77}
}]U\+D\+P \index{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P@{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P@{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P}}\item[{\em 
\hypertarget{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c}{S\+O\+C\+K\+E\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P}\label{_socket_8h_a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c}
}]T\+C\+P \end{description}
\end{Desc}
\hypertarget{_socket_8h_a75ed4a192272be57647226a203cd8975}{\index{Socket.\+h@{Socket.\+h}!T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E@{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E}}
\index{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E@{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E}!Socket.\+h@{Socket.\+h}}
\subsubsection[{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+E}}}\label{_socket_8h_a75ed4a192272be57647226a203cd8975}
定义tcp连接状态 \begin{Desc}
\item[枚举值]\par
\begin{description}
\index{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T@{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T@{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T}}\item[{\em 
\hypertarget{_socket_8h_a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278}{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T}\label{_socket_8h_a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278}
}]断开状态 \index{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+C\+O\+N\+N\+E\+C\+T\+E\+D@{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+C\+O\+N\+N\+E\+C\+T\+E\+D}!Socket.\+h@{Socket.\+h}}\index{Socket.\+h@{Socket.\+h}!T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+C\+O\+N\+N\+E\+C\+T\+E\+D@{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+C\+O\+N\+N\+E\+C\+T\+E\+D}}\item[{\em 
\hypertarget{_socket_8h_a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52}{T\+C\+P\+\_\+\+L\+I\+N\+K\+\_\+\+C\+O\+N\+N\+E\+C\+T\+E\+D}\label{_socket_8h_a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52}
}]连接状态 \end{description}
\end{Desc}
